<!DOCTYPE html>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<script type="text/javascript">
	function submit_edit_tch_form(){
	$.post("editInfoAction!saveTeacherInfo",$("#edit_tch").serialize(),function(data){
		$(".content").html(data);
	
	});

}
</script>
	<s:action name="getTeacherRequest"></s:action>
    <s:set name="teacher" value="#request.tch"/>
   
<div class="content">
	<div class="account_info">
    	<img src="pic/photo.jpg" class="user_photo" />
        <ul>
        	<li><span><s:property value="#teacher.name"/></span><span><s:property value="#teacher.sex"/></span></li>
            <li><s:property value="#teacher.email"/>@whu.edu.cn</li>
        </ul>
    </div>
    <hr class="line" />
    <div class="details">
    <s:form theme="simple" action="editInfoAction!saveTeacherInfo" method="post" id="edit_tch">
    	<h>基本资料</h>
    	<ul>
        	<li><strong>*</strong><span>学院:</span>
           <s:textfield  name="teacher.faculty" value="%{#teacher.faculty}"></s:textfield>
            </li>
           <li><strong>&nbsp;</strong><span>电话：</span><s:textfield  label="电话" name="teacher.phone" value="%{#teacher.phone}"></s:textfield>
   		   </li>
            <li><strong>*</strong><span>邮件：</span><s:textfield  label="邮箱" name="teacher.regularEmail" value="%{#teacher.regularEmail}" ></s:textfield>
   			</li>
        </ul>
        <h>研究相关</h>
        <ul>
		    <li><strong>*</strong><span>研究方向：</span><br />
            	<s:textarea   name="teacher.field " value="%{#teacher.field}"></s:textarea>
            </li>
        	<li><strong>*</strong><span>实验地点：</span><br />
            	<s:textarea  name="teacher.lab " value="%{#teacher.lab}"></s:textarea>
            </li>
        	<li><strong>*</strong><span>科研成果：</span><br />
            	<s:textarea  name="teacher.achievement" value="%{#teacher.achievement}"></s:textarea>
            </li>

        </ul>
        
         <input type="button" onclick="submit_edit_tch_form();" value="保存修改" name="submit_btn" />
       <!-- 
           <input type="submit" onclick="$('.content').load('editInfoAction!saveTeacherInfo')" value="保存修改" name="submit_btn" />
           -->
          <input type="reset" value="取消" />
    </s:form>
    </div>
    
</div>
